package com.yanqu.road.server.cmd.grandchild.exam;

import com.yanqu.road.pb.grandchild.GrandChildProto;
import com.yanqu.road.server.cmd.base.AbstractCommand;
import com.yanqu.road.server.command.Cmd;
import com.yanqu.road.server.gameplayer.GamePlayer;
import com.yanqu.road.message.YanQuMessage;
import com.yanqu.road.server.protocol.CrossProtocol;
import com.yanqu.road.server.protocol.GameProtocol;

@Cmd(code = GameProtocol.S_GRAND_CHILD_ENTER_IMPERIAL_EXAM, desc = "进入科举考场")
public class EnterImperialExamCmd extends AbstractCommand {

    private GrandChildProto.EnterImperialExamReqMsg reqMsg;

    @Override
    public boolean parseData(YanQuMessage packet) throws Exception {
        reqMsg = GrandChildProto.EnterImperialExamReqMsg.parseFrom(packet.getBytes());
        return true;
    }

    @Override
    public void execute(GamePlayer player, YanQuMessage packet) throws Exception {
        // 跨服请求数据
        player.sendPacket(CrossProtocol.C_GRAND_CHILD_ENTER_IMPERIAL_EXAM, reqMsg.toBuilder());
    }

    @Override
    public void sendData(GamePlayer player) {

    }
}
